import { useRoutes, Navigate } from "react-router-dom";
import HomePage from "../pages/HomePage";
import Layout from "../pages/Layout";

const routes = [
  {
    path: '/',
    element: <Navigate to={'/homePage'} />
  },
  {
    path: '/*',
    element: <Layout />
  }
];

export default function RouterView () {
  const elem = useRoutes(routes);
  return elem;
}